<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位的简介</title>
    <style>
        body{
            font-size: 30px;
        }
        .box1{
            width: 100px;
            height: 100px;
            background-color: #bfa;
        }
        .box2{
            width: 100px;
            height: 100px;
            background-color: orange;
            /* margin-left: 100px;
            margin-top: -100px; */
            position: relative;
            top: -100px;
            left: 50px;
        }
        .box3{
            width: 100px;
            height: 100px;
            background-color: red;
            /* margin-top: 100px; */
        }
    </style>
</head>
<body>
    <div class="box1">1</div>
    <div class="box2">2</div>
    <div class="box3">3</div>
</body>
</html>